/* 全局样式重置与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 Logo 样式 */
header {
    margin-bottom: 30px;
}

.logo {
    height: 40px;
}

/* 通用板块标题样式 */
section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 15px;
}

/* 通用导航栏样式 */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

nav ul li {
    padding: 10px 20px;
    cursor: pointer;
    margin: 0 5px;
}

nav ul li.active {
    color: #28a745;
}

nav ul li:hover {
    background-color: #f0f0f0;
}

/* 歌单推荐板块样式 */
.playlist-section {
    padding-top: 30px;
    margin-bottom: 20px;
    background-color: #ffffff; 
}

.playlist-list {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 20px;
}

.playlist-item {
    padding: 10px;
    border-radius: 4px;
    text-align: left;
}

.playlist-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.playlist-item p {
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item span {
    font-size: 12px;
    color: #999;
}

/* 新歌首发板块样式 */
.new-song-section {
    padding-top: 30px;
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 4px;
}

.play-all button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    margin-bottom: 15px;
}

.new-song-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.song-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.song-info h3 {
    font-size: 12px;
    margin-bottom: 5px;
}

.song-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}
.song-time {
    font-size: 12px;
    color: #999;
    margin-left: auto;
    white-space: nowrap; /* 防止时间换行 */
    /* 无需额外定位，父元素的align-items: center已确保垂直居中 */
}

.song-info span {
    font-size: 13px;
    color: #999;
}

/* MV 板块样式 */
.mv-section {
    padding-top: 30px;
    margin-bottom: 40px;
    background-color: #fff; 
}

.mv-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.mv-item {
    padding: 10px;
    border-radius: 4px;
}

.mv-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 4px;
}

.mv-item p {
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-item span {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 3px;
}


/* 响应式适配（不同屏幕尺寸下调整布局） */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    body {
        min-width: auto; /* 在较小屏幕上移除最小宽度限制 */
    }
    
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .playlist-list, .mv-list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .new-song-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .playlist-list, .mv-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .new-song-list {
        grid-template-columns: 1fr;
    }
    
    /* 优化导航菜单 */
    nav ul {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    nav ul li {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .playlist-list, .mv-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 10px;
    }
    
    /* 优化图片尺寸 */
    .playlist-item img {
        height: 180px;
    }
    
    .mv-item img {
        height: 150px;
    }
    
    section h2 {
        font-size: 20px;
    }
}